// components/goods/goods.js
Component({
  /**
   * 组件的属性列表
   */
  properties: {
    goods: {
      type: Object,
      value: {}
    },
    coupons: {
      type: Object,
      value: {},
      observer: function (newVal) { 
        this.setData({
          coupons: newVal
        })
      }
    }
  },

  /**
   * 组件的初始数据
   */
  data: {
    coupons: []
  },

  /**
   * 组件的方法列表
   */
  methods: {
    goGoodsDetail(e) {
      var goodsId = e.currentTarget.dataset.goodsId
      wx.navigateTo({
        url: '/pages/mall/goodsDetail/goodsDetail?goodsId=' + goodsId,
      })
    }
  }
})
